package org.hxzon.workeasy.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.validation.constraints.Size;

import org.hxzon.workeasy.model.base.BelongToUser;

@Entity
public class EasyJob extends BelongToUser implements Comparable<EasyJob> {

    private static final long serialVersionUID = -2394146567804248902L;
    public static final int anyTime = -8;

    @Column(columnDefinition = DefineVarchar64)
    @Size(max = DefineSize64)
    private String jobTitle;

    @Column(columnDefinition = DefineVarchar2048)
    @Size(max = DefineSize2048)
    private String jobContent;

    @Column(columnDefinition = DefineVarchar2048)
    @Size(max = DefineSize2048)
    private String jobTime;

    private int notifyYear;

    private int notifyMonth;

    private int notifyDate;

    private int notifyHour;

    private int notifyMinute;

    public String toString() {
        return this.jobTitle + "[" + this.jobTime + "]";
    }

    public boolean equals(Object o) {
        if (o == this) {
            return true;
        }
        if (!(o instanceof EasyJob)) {
            return false;
        }
        EasyJob other = (EasyJob) o;
        return this.getId().equals(other.getId());
    }

    public int hashCode() {
        return this.getId().hashCode();
    }

    public int compareTo(EasyJob o) {
        return this.getId().compareTo(o.getId());
    }

    public String getJobTitle() {
        return jobTitle;
    }

    public void setJobTitle(String jobTitle) {
        this.jobTitle = jobTitle;
    }

    public String getJobContent() {
        return jobContent;
    }

    public void setJobContent(String jobContent) {
        this.jobContent = jobContent;
    }

    public String getJobTime() {
        return jobTime;
    }

    public void setJobTime(String jobTime) {
        this.jobTime = jobTime;
    }

    public int getNotifyYear() {
        return notifyYear;
    }

    public void setNotifyYear(int notifyYear) {
        this.notifyYear = notifyYear;
    }

    public int getNotifyMonth() {
        return notifyMonth;
    }

    public void setNotifyMonth(int notifyMonth) {
        this.notifyMonth = notifyMonth;
    }

    public int getNotifyDate() {
        return notifyDate;
    }

    public void setNotifyDate(int notifyDate) {
        this.notifyDate = notifyDate;
    }

    public int getNotifyHour() {
        return notifyHour;
    }

    public void setNotifyHour(int notifyHour) {
        this.notifyHour = notifyHour;
    }

    public int getNotifyMinute() {
        return notifyMinute;
    }

    public void setNotifyMinute(int notifyMinute) {
        this.notifyMinute = notifyMinute;
    }

}
